#include <eikstart.h>
/*
 * Word.h
 *
 *  Created on: Jun 24, 2010
 *      Author: Administrator
 */

#ifndef WORD_H_
#define WORD_H_
//#pragma pack(push,1)

class CKeyWord
{
public:
	TText iKeyword[32];	// wchar_t
	int		iMeaningOffset;
	int		iMeaningLength;
	CKeyWord()
		{
			iMeaningOffset = -1;
			iMeaningLength = 0;
		}
	CKeyWord(const CKeyWord& aSrc)
		{
			iMeaningOffset = aSrc.iMeaningOffset;
			iMeaningLength = aSrc.iMeaningLength;
			for (int i = 0; i < 32; ++i)
				iKeyword[i] = aSrc.iKeyword[i];	
		}
	CKeyWord operator=(const CKeyWord& aSrc)
		{
			iMeaningOffset = aSrc.iMeaningOffset;
			iMeaningLength = aSrc.iMeaningLength;
			for (int i = 0; i < 32; ++i)
				iKeyword[i] = aSrc.iKeyword[i];	
		}
};

struct CPrimaryIndex
{
	// First char of word
	TText iFirstChar;

	// Offset of Secondary Index System of this FirstChar
	int		iOffset;

	// Length of this segment
	int		iLength;

	CPrimaryIndex()
	{
		iOffset = -1;	// hasn't point to anywhere
		iLength = 0;
	}
};

struct CSecondaryIndex
{
	// Two First character of word, last for '\0'
	TText iTwoFirstChar[3];
	
	// Offset of Word System which have word begin with TwoFirstChar
	int		iOffset;

	int		iLength;
	CSecondaryIndex()
	{
		iOffset = -1;
		iLength = 0;
	}
};

//#pragma pack(pop)

#endif /* WORD_H_ */
